package net.sebpx.subgeste.service;


import java.util.List;

import net.sebpx.subgeste.dao.ContactDAO;
import net.sebpx.subgeste.form.Contact;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;


@Service
public class ContactServiceImpl implements ContactService{

    @Autowired
    ContactDAO contactDAO;

    @Override
    @Transactional
    public void addContact(Contact contact) {
       contactDAO.addContact(contact);
    }

    @Override
    @Transactional
    public List<Contact> listContact() {
    return  contactDAO.listContact();
      
    }

    @Override
    @Transactional
    public void removeContact(Integer id) {
       contactDAO.removeContact(id);
    }



}